<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="Mickael Faivre-Macon" />
	<meta name="keywords" content="ptm, project, task, manager" />
	<meta name="description" content="A project and task manager" />
	<meta name="robots" content="all" />
	<title>PTM - Project and Task Manager</title>
	<%= javascript_include_tag "prototype", "effects", "controls", "window", "application",  "dragdrop",	'tasks', 'calendar', 'jscalendar/calendar' , 'jscalendar/calendar-setup', 'jscalendar/lang/calendar-en' %>
	<style type="text/css" title="currentStyle" media="screen">
		@import '/stylesheets/styles.css';
    @import '/stylesheets/windows_themes/default.css';
    @import '/javascripts/jscalendar/calendar-win2k-1.css';
	</style>
	<link rel="Shortcut Icon" type="image/x-icon" href="/images/favicon.ico" />	
</head>
<body>
<div id="container">
<%logo = cookies['ptm_logo'] || []%>
<div id="logo"<%if(logo==[] or logo!='display') %> style="display:none;"<%end%>>Project and Task Manager</div>
<% cur = @controller.class.controller_path -%>
<ul id="header">
<span class="quick_add"><a href="#" onclick="show_qa();">quick add</a></span>
<span id="clock"><%=Date.today.strftime('%A %b %d %Y')%></span>
<span <% if cur=="welcome" then%>id="currentmenuline" <%end%>class="menuline"><a href="/">dashboard</a></span>
<span <% if cur=="project" then%>id="currentmenuline" <%end%> class="menuline"><a href="/project">projects</a></span>
<span <% if cur=="task" then%>id="currentmenuline" <%end%> class="menuline"><a href="/task">tasks</a></span>
<!--<span <% if cur=="writeboards" then%>id="currentmenuline" <%end%> class="menuline"><a href="/writeboards">writeboards</a></span>-->
<span <% if cur=="calendar" then%>id="currentmenuline" <%end%> class="menuline"><a href="/calendar">calendar</a></span>
<span <% if cur=="myinfo" then%>id="currentmenuline" <%end%> class="menuline"><a href="/myinfo">profile</a></span>
<span id="logout"><a href="/account/logout">logout</a></span>
<span class="menuline2"><a href="#" onclick="toggle_logo();return false;">toggle</a></span>
</ul>
<div id="side">
<% user = session['user']; if user.email==nil or user.email==''-%>
<h3>email</h3>
You didn't <%=link_to("set your email", :controller=>:myinfo)%>. If you forget your password, you will not be able to retreive it.<br/><br/>
<% end -%>
  
<% if user.projects.size > 0 %>
<h3>projects</h3>
<ul class="project_list">
<li><a href="/inbox">Inbox</a> (<%=Task.inbox_tasks(user).size%>)</li>
<%= render(:partial=>'project/list.rhtml', :collection=>user.active_projects.sort_by{|p| p.name.downcase}) %>
</ul>
<% end %>

<div id="notice"><% if flash[:notice] -%><h3>Notice</h3><%= flash[:notice] %><% end -%></div>
<div id="info"><% if flash[:info] -%><h3>Info</h3><%= flash[:info] %><% end -%></div>  
<div id="members"><% if flash[:members] -%><%= flash[:members] %><% end -%></div>  

</div>

<div id="content">
<% form_remote_tag(:url=>{:controller=>'task', :action=>'display_tasks_search_results'}, :update=>'search') do %>
Search
<%= my_text_field_with_auto_complete(:task, :title, {:size=>50, :id=>'test'}, :skip_style => true) %>
<%= link_to_function('hide results','$("search").update("")') %>
<%end%>
<div id="search"></div>

<%= yield %>



<p><br/></p>
</div>

<div id="footer">
PTM beta version |
Tested mainly with firefox |
For any ideas, please write to us: <a href="mailto:protask@protaskm.com">protask@protaskm.com</a> |
<a href="/newfeatures.xml">RSS</a> |
<a href="/privacy.html">Privacy</a> |
<a href="/terms.html">Terms of service</a> | Design by <a href="http://www.kumi.co.nr">Kumiko</a>
</div>

</div>

<% if(request.host!="127.0.0.1")  -%>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-88514-5";
urchinTracker();
</script>
<% end -%>
</body>
</html>
